<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <title></title>
  <style type="text/css">
    body { width: 250px; height: 300px; margin-top: 0; }
    table { font-size: 12px; margin-top: 5px; }
    td { text-align: center; }
    div { margin-bottom: 3px; }
    #docked_height, #undocked_height { width: 35px; margin-right: 10px; }
    label { width: 5em; }
  </style>
  <script src="jquery.js" type="text/javascript"></script>
  <script type="text/javascript">
    var SETTINGS = {};

    SETTINGS.settingsClosing = function (event) {
      if (event.closeAction == event.Action.commit) {
        var pw = System.Gadget.document.parentWindow;
        pw.APP.settings.dockedRows(dockedRows.value);
        pw.APP.settings.dockedCols(dockedCols.value);
        pw.APP.settings.undockedRows(undockedRows.value);
        pw.APP.settings.undockedCols(undockedCols.value);
      }
      event.cancel = false;
    };

    $(function () {
      System.Gadget.onSettingsClosing = SETTINGS.settingsClosing;
      var pw = System.Gadget.document.parentWindow;
      dockedRows.value = pw.APP.settings.dockedRows();
      dockedCols.value = pw.APP.settings.dockedCols();
      undockedRows.value = pw.APP.settings.undockedRows();
      undockedCols.value = pw.APP.settings.undockedCols();
    });

  </script>
</head>
<body>
  <fieldset><legend>Docked</legend>
    <label>Rows: </label>
    <input id="dockedRows" /><br />
    <label>Cols: </label>
    <input id="dockedCols" /><br />
  </fieldset>
  <p>&nbsp;</p>
  <fieldset><legend>undocked</legend>
    <label>Rows: </label>
    <input id="undockedRows" /><br />
    <label>Cols: </label>
    <input id="undockedCols" /><br />
  </fieldset>
</body>
</html>
